package com.yohann.designPattern.proxy.staticproxy;

/**
 * <p>
 * 老师Dao代理(静态代理）
 * </p>
 *
 * @author Yohann
 * @since 2021/2/8 16:28
 */
public class TeacherDaoProxy implements ITeacherDao {
    private ITeacherDao target;

    public TeacherDaoProxy(ITeacherDao target) {
        this.target = target;
    }

    @Override
    public void teach() {
        System.out.println("proxy start...");
        target.teach();
        System.out.println("proxy end...");
    }
}